import junit.framework.TestCase;


public class LiczbaTest extends TestCase {

	Liczba test = null;
	Liczba test2 = null;
	protected void setUp() throws Exception {
		super.setUp();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
		test = null;
		test2 = null;
	}

	public void testLiczba() {
		try
		{
			test = new Liczba(-10);
			fail("Brak wyjatku");
		}
		catch(Exception success){}
	}

	public void testZapis() {
		try
		{
			test = new Liczba(10);
			assertNotNull("Success",test);
			assertEquals("Success","1010",test.zapis(2));
			test = new Liczba(255);
			assertTrue("Success","FF".compareTo(test.zapis(16)) == 0);
			test = new Liczba(5);
			test2 = new Liczba(5);
			assertNotSame(test,test2);
		}
		catch(Exception fail)
		{
			fail("Niepoprawny wyjatek");
		}
	}

}